package com.muli.muwai.dao;




import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muli.muwai.entity.ReturnMoney;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;


@Mapper
public interface ReturnMoneyDao extends BaseMapper<ReturnMoney> {
    @Insert({"<script>INSERT INTO returned_money(`acknowledging_time`, `contract_id`, " +
            "`filiale`, `retail`, `returned_money_nature`, `proceeds_money`, `bank_cash`, " +
            "`filiale_name`,`account`, `remark`) VALUES " +
            "<foreach collection='list' item='item' index='index' separator=','>"+
            "(#{item.acknowledging_time}, #{item.contract_id}, " +
            "#{item.filiale}, #{item.retail}, #{item.returned_money_nature}, #{item.proceeds_money}, #{item.bank_cash}, " +
            "#{item.filiale_name},#{item.account},#{item.remark})"+
            "</foreach>"+
            "</script>"
    })
   // @SelectKey(statement = "SELECT LAST_INSERT_ID",keyProperty = "id",before = false,resultType = Long.class) //返回自增主键用
    int insertList(List<ReturnMoney> list);
}
